package com.chinastock.log;

import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.ServerWebExchangeDecorator;

/**
 * @author zhangfan.it
 * @date 2021/2/3
 */
public class ExtractResponseBodyServerWebExchangeDecorator extends ServerWebExchangeDecorator {
    private final ExtractBodyServerHttpResponseDecorator extractBodyServerHttpResponseDecorator;

    protected ExtractResponseBodyServerWebExchangeDecorator(ServerWebExchange delegate, String excludes, boolean isOn) {
        super(delegate);
        extractBodyServerHttpResponseDecorator = new ExtractBodyServerHttpResponseDecorator(delegate, excludes, isOn);
    }

    @Override
    public ServerHttpResponse getResponse() {
        return extractBodyServerHttpResponseDecorator;
    }
}
